<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <link rel="stylesheet" type="text/css" href="__STATIC__/index/css/style.css"/>
    <script type="text/javascript" src="__STATIC__/index/js/rem.js"></script>
    <title>订单详情</title>
</head>
<body class="geryBg">
<div class="order">
    <!--订单状态-->
    <div class="order_status clear">
        <div class="fl white status_text">
            <p class="wait_send">已完成</p>
        </div>
        <div class="fr status_icon">
            <img class="auto-img" src="__STATIC__/index/img/icon-order-status_4.png"/>
        </div>
    </div>
    <!--收货人地址-->
    <div class="order_address">
        <div class="order_add_detail">
            <div class="clear order_concat smoth">
                <p class="fl">收货人: <em>{$order.name}</em></p>
                <p class="fr">{$order.phone}</p>
            </div>
            <div class="order_add smoth">
                <img class="icon-add" src="__STATIC__/index/img/icon-add.png"/>
                <p>收货地址：{$order.address}</p>
            </div>
        </div>
        <p class="line"></p>
    </div>
    <!--商品详情-->
    {foreach $order.orderlist as $vo}
    <div class="order_goods whiteBg clear">
        <div class="order_img fl">
            <img class="auto-img" src="{$vo.goods_spec_img}"/>
        </div>
        <div class="order_des fr">
            <div class="clear super-text smoth bold">
                <p class="fl">{$vo.goods_title}</p>
                <p class="fr">￥{$vo.price}</p>
            </div>
            <div class="clear normall-text lightgery">
                <p class="fl">{$vo.goods_spec}</p>
                <p class="fr">X {$vo.num}</p>
            </div>
            <div class="clear normall-text lightgery">
                <p class="fr">实付：{$vo.pay}</p>
            </div>
        </div>
        <div class="order_btn clear" style="position: static">
            <div class="fr normall-text">
                {if $vo.status==1 && $vo.is_com==0}
                {php}$jiesuan_time = strtotime($order['jiesuan_time']);if($jiesuan_time>time()){{/php}
                <button class="cancel" data-value="{$vo.id}">申请售后</button>
                {php}}{/php}
                <button class="pay_now" data-value="{$vo.id}">立即评价</button>
                {/if}
            </div>
        </div>
    </div>
    {/foreach}

    <!--运费-->
    <div class="order_carriage whiteBg">
        <div class="clear normall-text smoth">
            <p class="fl">积分</p>
            <p class="fr">-￥{$order.point_pay}</p>
        </div>
        <div class="clear super-text smoth bold">
            <p class="fl">实付款</p>
            <p class="fr brown">￥{$order.pay}</p>
        </div>
    </div>
    <!--订单支付方式-->
    <div class="order_pay smoth normall-text whiteBg">
        <p>订单编号: <em>{$order.order_num}</em></p>
        <p>支付方式: <em>微信</em></p>
        <p>下单时间: <em>{$order.create_at}</em></p>
    </div>
    <!--订单支付按钮-->

</div>
<script type="text/javascript" src="__STATIC__/index/js/jquery-1.11.2.min.js"></script>
<script type="text/javascript">
    //点击操作按钮
    $('.order_btn button').on('click', function () {
        if ($(this).text() == '申请售后') {
            //点击申请售后
            window.location.href = 'post_sale?id='+$(this).data('value');
        } else if ($(this).text() == '立即评价') {
            //点击立即评价
            window.location.href = 'comment?id='+$(this).data('value');
        }
    })
</script>
</body>
</html>